{extend name="Base/common"}
{block name="header"}
<link rel="stylesheet" href="__HOME__/css/user_center.css">
{include file="Public/header1"}
{/block}
{block name="body"}
<div class='detail' style='background-color: #f7f7f4'>
    <section id="tour_data" data-channel_id="11756" data-product_type="4" data-breakdown_symbol="&amp;#8364;" class="tour-main">
        <div class="row">
            <!--侧边栏start-->
            <div class="columns small-12 medium-5 large-3 calendar-column sticky-container" data-sticky-container="" style="height: 572px; border:1px solid #ccc; margin-top:10px; padding: 0">
            	<h2 class='menu-title1'>{:$post == '0' ? '学生菜单' : '维修工菜单'}</h2>
				{if condition='$post == 0'}
	            	<ul class='menu-list1'>
	            		<li><a href="/User/index">我的订单</a></li>
	            		<li><a href="/User/index?status=3">我的评价</a></li>
	            	</ul>
                    {else /}
                    <ul class='menu-list1'>
                        <li><a href="/User/index">我的订单</a></li>
                        <li><a href="/User/index?status=3">完成订单</a></li>
                        <li><a href="/User/message">我的消息</a></li>
                    </ul>
            	{/if}
            </div>
            <!--侧边栏end-->

            <!--新闻详细start-->
            <div class="columns small-12 medium-5 large-9 calendar-column sticky-container" data-sticky-container="" style='margin-top:10px'>
                <ul class="clearfix list0">
                    <li class="order-item" style='background-color: #4E83E3; color: #fff'>
                        <span class='col3' style='text-indent: 10px'>维修项目</span>
                            <span class='col3'>区域</span>
                            <span class='col3'>维修描述</span>
                            <span class='col3'>{:$post == 0 ? '维修人' : '报修人'}</span>
                            <span class='col3 btn-wrap'>操作</span>
                    </li>
                </ul>
                <ul class='clearfix list1'>
                    {empty name='order'}
                    <div class='nobady' style='height: 532px'>
                        <img src="__HOME__/img/empty.png" alt="空空如也" />
                        <span>空空如也</span>
                    </div>
                    {else /}
                    {if condition='$post == 0'}
                    {volist name='order' id='item'}
                        <li class='order-item'>
                            <span class='col3' style='text-indent: 10px'>{$item.name}</span>
                            <span class='col3'>{$item.address}</span>
                            <span class='col3'>{$item.repair_desc}</span>
                            <span class='col3'>{$item.wx_name}</span>
                            <span class='col3 btn-wrap'>
                                {if condition='$item.status == 0'}
                                    <i class='#'>待系统分配</i>
                                    {elseif condition='$item.status == 1' /}
                                    <i class='#'>待受理</i>
                                    {elseif condition='$item.status == 2' /}
                                    <a class='#'>待完工</a>
                                    {elseif condition='$item.status == 3' /}
                                    <i class="comment-btn" =''>评价</i>
                                    <input type="hidden" value='{$item.id}'>
                                    <input type="hidden" value='{$item.uid}'>
                                {/if}
                            </span>
                        </li>
                    {/volist}
                    {else /}
                    {volist name='order' id='item'}
                        <li class='order-item'>
                            <span class='col3' style='text-indent: 10px'>{$item.name}</span>
                            <span class='col3'>{$item.address}</span>
                            <span class='col3'>{$item.repair_desc}</span>
                            <span class='col3'>{$item.bx_name}</span>
                            <span class='col3 btn-wrap'>
                                {if condition='$item.status == 1'}
                                    <a href="/User/commit?id={$item.id}" class=''>接受</a>
                                    {elseif condition='$item.status == 2' /}
                                    <a href="/User/complete?id={$item.id}" class=''>维修完成</a>
                                    {elseif condition='$item.status == 3' /}
                                    <i class=''>等待用户评价</i>
                                {/if}
                            </span>
                        </li>
                    {/volist}
                    {/if}
                    {/empty}
                </ul>
            </div>
            <!--新闻详细end-->
        </div>
    </section>
</div>

<div class='comment-cover'>
    <div class='comment-box'>
        <div class='comment-title'>
            <h3 class='fl'>评价</h3>
            <span class='fr comment-close'>关闭</span>
        </div>
        <form action="/User/comment" method="post"> 
            <p>请填写你的反馈吧！</p>
            <input type="hidden" value="" name='repair_id' id='true_id'>
            <input type="hidden" value="" name='to' id='to'>
            <div class='radio'>
                <label for=""><input type='radio' name='status' value='0' title="差评" />差评</label>
                <label for=""><input type='radio' name='status' value='1' title="中评" />中评</label>
                <label for=""><input type='radio' name='status' value='2' title="好评" checked="" />好评</label>
            </div>
            <div class='content'>
                <textarea name="content" id="" cols="30" rows="10" placeholder='说点什么吧'></textarea>
            </div>
            <div class="btn-wrap">
                <input type="submit" value="提交">
                <input type="reset" value='重置'>
            </div>
        </form>
    </div>
</div>

<script>
    $(function() {
        $('.comment-btn').click(function() {
            $('#true_id').val($(this).next().val())
            $('#to').val($(this).next().next().val())
            $('.comment-cover').add('.comment-box').fadeIn();
        })

        $('.comment-close').click(function() {
            $('.comment-cover').add('.comment-box').fadeOut();
            $('#true_id').val('')
            $('#to').val('')
        })
    })
</script>
{/block}
{block name="footer"}
{include file="Public/footer1"}
{/block}